{extend name="public/base"/}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__PUBLIC__/writer/style/books.css">
{/block}
{block name="body"}
    {include file="public/topmenu" /}
    {include file="public/changepwd" /}
    <div class="mainWrap pageCenter cf">     
        {include file="public/leftmenu" /}
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/writer/style/income.css">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/writer/style/reader_model.css">

        <div class="mainRight pb260 fl">
        <div class="crumbsWrap"> <i><span>收入管理</span></i> </div>
        <div class="tabSwitch cf">
            <span>
                <a href="{:url('writer/stats/incomemonth')}">总收入</a>
            </span>
			<span class="act">
                <a href="{:url('writer/stats/incomewelfar')}">奖励保障</a>
            </span>
            <span  >
                <a href="{:url('writer/stats/incomecopyright')}">版权收入</a>
            </span>
			<span>
                <a href="{:url('writer/stats/incomesubscription')}">订阅明细</a>
            </span>
            <span>
                <a href="{:url('writer/stats/incomerewards')}">打赏明细</a>
            </span>
        </div>
        <div class="incomeWrap">
            <div class="filter-box income cf">
          <em>查看方式：</em>
          <select name="showtype">
                <option value="date" selected="selected">按月份</option>
                <option value="works">按作品</option>
          </select>
          <select name="novel" style="display:none;">
				<option value="0" selected>请选择</option>
				 {volist name="books" id="vo"}
				<option value="{$vo.id}">{$vo.title}</option>
				{/volist}        </select>
            <select name="year" >
				<option value="2018"  {eq name="year" value="2018"}selected="selected"{/eq}>2018</option>
				<option value="2019" {eq name="year" value="2019"}selected="selected"{/eq}>2019</option>
				<option value="2020" {eq name="year" value="2020"}selected="selected"{/eq}>2020</option>
				<option value="2021" {eq name="year" value="2021"}selected="selected"{/eq}>2021</option>
				<option value="2022" {eq name="year" value="2022"}selected="selected"{/eq}>2022</option>
				<option value="2023" {eq name="year" value="2023"}selected="selected"{/eq}>2023</option>
            </select>
            <select name="month" >
				 <option value="1" {eq name="month" value="1"}selected="selected"{/eq}>1</option>    
				 <option value="2" {eq name="month" value="2"}selected="selected"{/eq}>2</option>    
				 <option value="3" {eq name="month" value="3"}selected="selected"{/eq}>3</option>    
				 <option value="4" {eq name="month" value="4"}selected="selected"{/eq}>4</option>
				 <option value="5" {eq name="month" value="5"}selected="selected"{/eq}>5</option>
				 <option value="6" {eq name="month" value="6"}selected="selected"{/eq}>6</option>    
				 <option value="7" {eq name="month" value="7"}selected="selected"{/eq}>7</option>    
				 <option value="8" {eq name="month" value="8"}selected="selected"{/eq}>8</option>    
				 <option value="9" {eq name="month" value="9"}selected="selected"{/eq}>9</option>    
				 <option value="10" {eq name="month" value="10"}selected="selected"{/eq} >10</option>    
				 <option value="11" {eq name="month" value="11"}selected="selected"{/eq}>11</option>    
				 <option value="12" {eq name="month" value="12"}selected="selected"{/eq}>12</option> 
            </select>
          <a class="button" href="javascript:" id="searchBtn">查看</a>
        </div>
		<!---
        <div class="reserveChart mb30">
          <h3 class="reserveTitle"> <em class="icon pie"></em>奖励保障</h3>
            <div class="chartWrap">
                <div id="incomeSumBox" class="totalCenter" style="display:none;">
                    <table class="totalData" width="100%" border="0" cellspacing="0">
                        <tbody>
                        <tr>
                            <td><h3>总收入(元)</h3>
                                <p data-node="sum">0</p>
                                <h4><span data-node="incomeTypeName">全勤奖</span>（元）</h4>
                                <div id="incomeDetailBox" class="detailWrap">
                                    <span data-node="detailTotal">0</span>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div id="noDataBox" class="nodataBox" style="">
                    <img src="__PUBLIC__/writer/images/nodata.png" width="141" height="154">
                    <p>暂无收入</p>
                </div>
                <div class="reserveGraph" id="chartBox" style="display: none;"></div>
            </div>
        </div>
		--->
        <div class="reserveListWrap">
            <h3 class="reserveTitle">
                <em class="icon reward"></em>奖励保障明细
            </h3>
            <div class="detailWrap mb10">
                <table class="detailTable" width="100%" border="0" cellspacing="0">
                    <colgroup>
                        <col width="10%">
                        <col width="21%">
                        <col width="9%">
                        <col width="9%">
                        <col width="12%">
                        <col width="10%">
                        <col width="10%">
                        <col width="9%">
                        <col width="10%">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>时间</th>
                        <th>作品</th>
                        <th>全勤奖</th>
                        <th>节假日福利</th>
                        <th>保底奖</th>
                        <th>买断奖</th>
                        <th>月票奖励</th>
                        <th>其他</th>
                        <th>合计</th>
                    </tr>
                    </thead>
                    <tbody id="incomeList" incometype="welfar">    <tr>
                <td colspan="9">暂无任何数据</td>
            </tr>
        </tbody>
                </table>
            </div>
            <div id="pager" class="pageBox pr0 fr"></div>
            <div class="c999" style="font-size: 12px">*其他是指各分类特有的奖金福利，其他语言版本的信息网络传播权等收入项产生的稿酬</div>
        </div>
        <!--奖励保障模板-->
		<textarea id="incomeListTpl" style="display:none;">
			<%each list as item index%>
			<tr>
				<td><%= item.year %>年<%= item.month %>月</td>
				<td><a class="chapter titleft" href="javascript:">《<%= item.booktitle %>》</a></td>
				<td><%= !item.attendanceaward || parseFloat(item.attendanceaward)<=0?'0':parseFloat(item.attendanceaward) %>元</td>
				<td><%= !item.rewards || parseFloat(item.rewards)<=0?'0':parseFloat(item.rewards) %>元</td>
				<td><%= !item.basicliving || parseFloat(item.basicliving)<=0?'0':parseFloat(item.basicliving) %>元</td>
				<td><%= !item.halfyearaward || parseFloat(item.halfyearaward)<=0?'0':parseFloat(item.halfyearaward) %>元</td>
				<td><%= !item.monthlyward || parseFloat(item.monthlyward)<=0?'0':parseFloat(item.monthlyward) %>元</td>
				<td><%= parseFloat(parseFloat(item.other)+ parseFloat(item.bookfinish))<=0?'0':parseFloat(parseFloat(item.other)) %>元</td>
				<td>
					<%= !item.welfarincome || parseFloat(item.welfarincome)<=0?'0':parseFloat(item.welfarincome) %>元
				</td>
			</tr>
			<%/each%>
		</textarea>
		<!--奖励保障的无数据模板-->
		<textarea id="incomeEmptyListTpl" style="display:none;">
			<tr>
				<td colspan="9">暂无任何数据</td>
			</tr>
		</textarea></div>

        <img id="requestLoadingTip" class="loadImg" style="display: none;" src="__PUBLIC__/writer/images/loading.gif"></div>
        <script type="text/javascript" src="__PUBLIC__/writer/js/income.js"></script><script type="text/javascript">
            $(function () {
                CS.page.income.main.init();
            });
        </script>

    </div>
    {include file="public/footer" /}
<script type="text/javascript">
    $('#novelList').on('mouseenter', 'tr',
    function() {
        $(this).addClass('active').siblings('tr').removeClass('active');
    });
</script>
{/block}
{block name="script"}
{/block}


